<!DOCTYPE html>
<html style="font-size: 23.4375px;">
<head>
    <include file="./public/header.html"/>
<body style="font-size: 21.7589px;">
<div id="app">
    <div id="shadow" style="display: none;"></div>
    <header class="top">
        <span>下级报表</span> <!---->
        <div class="iconfont back" style="display: none;"></div>
        <a href="{:U('Users/agentCenter')}" class="iconfont back" style=""></a>
    </header>
    <div data-v-4bd3a23e="" class="main" s="[object Object]">

            <div class="textMore dataType"><em>今天</em> <i class="iconfont"></i></div>
            <div class="_problemBox" style="display: none;">
                <div class="blackBg"></div>
                <div class="moreLayer">
                    <ul>
                        <li><a data-sj='1' href="{:U('Users/lowerReport',array('shijian'=>1))}" class="<?php if($shijian=='1'){echo 'on';}; ?>">今天</a></li>
                        <li><a data-sj='2' href="{:U('Users/lowerReport',array('shijian'=>2))}" class="<?php if($shijian=='2'){echo 'on';}; ?>">昨天</a></li>
                        <li><a data-sj='3'  href="{:U('Users/lowerReport',array('shijian'=>3))}" class="<?php if($shijian=='3'){echo 'on';}; ?>">本月</a></li>
                        <li><a data-sj='4'  href="{:U('Users/lowerReport',array('shijian'=>4))}" class="<?php if($shijian=='4'){echo 'on';}; ?>">上月</a></li>
                    </ul>
                    <ul>
                        <li><a class="quxiao2">取消</a></li>
                    </ul>
                </div>
            </div>

        <table data-v-4bd3a23e="" class="col3Table col3TableTitle">
            <tbody data-v-4bd3a23e="">
            <tr data-v-4bd3a23e="">
                <th data-v-4bd3a23e="">账号</th>
                <th data-v-4bd3a23e="">类型</th>
                <th data-v-4bd3a23e="">报表人数</th>
                <th data-v-4bd3a23e="">盈利</th>
            </tr>
            <php>if(!empty($wanjia)):</php>
            <table data-v-4bd3a23e="" class="ajaxContent col3Table col3TableCon">
                <foreach name="wanjia" item="vo">
                    <tr data-v-4bd3a23e="" data-id="562004" class="active" data-uid="{$vo.userid}" data-num="{$vo.xj}">
                        <td data-v-4bd3a23e="">
                            <ins data-v-4bd3a23e="" style="color:#38f">{$vo.accounts}</ins>
                        </td>
                        <td data-v-4bd3a23e=""><?php echo count($sh)+1;?>级
                            <if condition="$vo.utype eq 1 ">代理
                                <else /> 玩家
                            </if></td>
                        <td data-v-4bd3a23e="" style="color:#e4393c">
                            <if condition="$vo['xj'] gt 0 ">
                                <a style="cursor: pointer;" data-v-44b7026d="">{$vo.xj}</a>
                            <else />{$vo.xj}
                            </if>
                        </td>
                        <td data-v-4bd3a23e="" style="color:#e4393c">{$vo.yingli}</td>
                    </tr>
                </foreach>

                <tr data-v-4bd3a23e="">
                    <td data-v-4bd3a23e="" colspan="4" class="msg loadingMsg">已显示<?php if($shijian==1){echo "今天";}elseif($shijian==2){echo "昨天";}elseif($shijian==3){echo "本月";}elseif($shijian==4){echo "上月";} ?>全部数据</td>
                </tr>
            </table>
            <php>else:</php>
                <div data-v-4bd3a23e="" class="bd dontSelect">
                    <div data-v-4bd3a23e="" class="scrollBox">
                        <div data-v-4bd3a23e="" class="touchScroll">
                            <div data-v-4bd3a23e="" class="fullPageMsg">
                                <div ddata-v-4bd3a23e="" class="fullPageIcon iconfont"></div>
                                <p ddata-v-4bd3a23e="">暂无记录</p>
                            </div>
                        </div>
                    </div>
                    <div data-v-1558f0ab="" class="scrollBox"><!----></div>
                    <div data-v-1558f0ab="" class="scrollBox"><!----></div>
                </div>
            <php>endif;</php>

            <div class="_problemBox2" data-v-473a97a8="" style="display: none">
                <div class="blackBg"></div>
                <div class="moreLayer">
                    <ul>
                        <li>
                            <a class="noActive currentUser">
                                <i class="iconfont"></i>
                                <ins>
                                    <span class="acc"></span>
                                </ins>
                            </a>
                        </li>
                        <input type="hidden" id="kan">
                        <input type="hidden" id="uuid">
                        <li class="zxc"><a class="chakan" onclick="ckbb()">查看报表</a></li>
                        <li class='chakan1' style="display: none;"><a onclick="showx()">查看下级</a></li>


                        <?php if(empty($sh)){?>
                        <li class='chakan2' style="display: none;"><a onclick="fhsj()">返回上级</a></li>
                        <?php }else{?>
                        <li class='chakan2'><a onclick="fhsj()">返回上级</a></li>
                        <?php }?>

                    </ul>
                    <ul>
                        <li><a class="quxiao">取消</a></li>
                    </ul>
                </div>
            </div>

            </tbody>
        </table>
    </div>
</div>
</body>
</html>
<script>
    $(function(){
        $(".moreLayer ul:nth-of-type(1) li").each(function () {
            if($(this).find("a").hasClass("on")){
                $(".dataType em").text($(this).text());
                window.ssj = $(this).find("a").data("sj");
            }
        })
    });

    $(".dataType").click(function(){
        $("._problemBox").show();
    });
    $("._problemBox ul:first-of-type li").click(function(){
        var TXT = $(this).text();
        $(".dataType em").text(TXT);
    });
    $("._problemBox ul li").click(function(){
        $("._problemBox").hide();
    });

    $(".active").click(function(){
        var uid = $(this).data("uid");
        var num = $(this).data("num");
        $.ajax({
            type: "POST",
            url: "{:U('Users/agentMember2')}",
            data: { 'uid': uid },
            success: function (dat) {
                var dd = dat.substr(0,dat.length-8);
                var ss = dat.substr(dat.length-8);
                $(".acc").html(dd);
                $("#kan").val(ss);
                $("#uuid").val(uid);
                $(".chakan1").hide();
                if(num>0){
                    $(".chakan1").show();
                }
                $("._problemBox2").show();
            }
        });
    });
    $(".quxiao").click(function(){
        $("._problemBox2").hide();
    })

    function ckbb(){
      //  var uid = $("#uuid").val();
        var zhanghao = $(".acc").html();
        window.location.href="/Users/agentReport/zhanghao/"+zhanghao+"/shijian/"+ssj;
    }
    function showx(){
        var uid = $("#uuid").val();
        window.location.href="/Users/lowerReport/userid/"+uid+"/lab/"+1+"/shijian/"+ssj;
    }
    function fhsj(){
        var uid = $("#uuid").val();
        window.location.href="/Users/lowerReport/userid/"+uid+"/lab/"+2+"/shijian/"+ssj;
    }
</script>